package com.example.neusoft.widgtetest;

import android.content.Intent;
import android.support.v7.app.AppCompatActivity;
import android.os.Bundle;
import android.view.View;
import android.widget.Button;
import android.widget.TextView;

public class NewActivity extends AppCompatActivity {
    private TextView textView;
    private Button button;
    @Override
    protected void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        setContentView(R.layout.activity_new);
        textView=(TextView)findViewById(R.id.textView2);
        Intent intent=getIntent();
        String str=intent.getStringExtra("para1");
        int i=intent.getIntExtra("para2",7);
        textView.setText(str+"----"+String.valueOf(i));

        button=(Button) findViewById(R.id.button4);
        button.setOnClickListener(new View.OnClickListener() {
            @Override
            public void onClick(View view) {
                finish();
            }
        });
    }
}
